<template>
    <div style="width:100%;height:auto;margin:0;padding:0;">
        <div class="div_link_rank_content" style="width:100%;">
            <div v-for="(d) in json_data" :key="d.title" style="width:50%;float:left;text-align:left;">
                <a :href="juchao(d.url, d.date)" target="_blank">[{{d.date}}][{{d.site}}]{{d.title}}</a>
            </div>
            <div style="clear:both"></div>
        </div>
        <div style="clear:both"></div>   
    </div>
</template>

<script>
  export default {
    name: 'ViewAttrV3',
    data() {
      return {
      };
    },
    props: {
      json_data: {
        type: Object,
        default: () => {}
      }
    },
    methods: {
      juchao(url,date){
        var host = url.substr(0,25);
        if (host == "http://www.cninfo.com.cn/") {
          var res = url.split("&");
          console.log(res);
          var name = res[1].split("=")[1];
          var new_url = "http://static.cninfo.com.cn/finalpage/".concat(date).concat("/").concat(name).concat(".PDF");
          console.log(new_url);
          return new_url;
        } else {
          return url;
        }
      }
    }
  };
</script>

<style>

.lanmu0 {
    clear:left;
}


</style>